import java.util.Calendar;
import java.util.Scanner;

public class FathersDayCalculator {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入年份: ");
        int year = scanner.nextInt();

        Calendar calendar = Calendar.getInstance();
        calendar.set(year, Calendar.JUNE, 1);

        int sundayCount = 0;
        while (sundayCount < 3) {
            if (calendar.get(Calendar.DAY_OF_WEEK) == Calendar.SUNDAY) {
                sundayCount++;
            }
            if (sundayCount < 3) {
                calendar.add(Calendar.DAY_OF_MONTH, 1);
            }
        }

        System.out.println("父亲节是: " + (calendar.get(Calendar.MONTH) + 1) + "-" + calendar.get(Calendar.DAY_OF_MONTH));
    }
}
